//
//  WCUnsavedFilesWindowController.h
//  WabbitCode
//
//  Created by William Towe on 2/8/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import <Cocoa/Cocoa.h>


typedef enum _WCUnsavedFilesType {
	WCUnsavedFilesTypeBeforeQuitting,
	WCUnsavedFilesTypeBeforeBuilding,
	WCUnsavedFilesTypeBeforeClosingProject,
	WCUnsavedFilesTypeBeforeClosingFile
	
} WCUnsavedFilesType;

@interface WCUnsavedFilesWindowController : NSWindowController {
	IBOutlet NSTableView *_tableView;
	
	NSString *_windowTitle;
	NSString *_headerTitle;
	NSString *_headerSubTitle;
	NSImage *_headerImage;
	NSArray *_unsavedFiles;
	WCUnsavedFilesType _type;
	
}
@property (readwrite, copy) NSString *windowTitle;
@property (readwrite, copy) NSString *headerTitle;
@property (readwrite, copy) NSString *headerSubTitle;
@property (readwrite, retain) NSImage *headerImage;
@property (readwrite, retain) NSArray *unsavedFiles;
@property (readwrite, assign) WCUnsavedFilesType type;

// returns either NSOKButton or NSCancelButton
+ (NSInteger)runModalForUnsavedFiles:(NSArray *)unsavedFiles type:(WCUnsavedFilesType)type;

- (IBAction)dontSaveAction:(id)sender;
- (IBAction)cancelAction:(id)sender;
- (IBAction)saveSelectedAction:(id)sender;
@end
